home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_A18F7F4539CC471BA7C2842DD6E1BE14
< prev
next >
Wrap
Text File
|
2004-11-20
|
574b
|
30 lines
//simple shader: combine color and texture sample and add in "extra" color
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//cloud sampler
sampler2D sampTex;
//"extra" color to add to final color
float4 clrExtra;
//shader input
struct PS_INPUT
{
float4 Color : COLOR;
float2 Tex0 : TEXCOORD0;
};
//shader code
float4 PShader(PS_INPUT In) : COLOR
{
//sample textutes
float4 texclr=tex2D(sampTex,In.Tex0);
//blend with vert color
float4 clr=texclr*In.Color + clrExtra*In.Color.a;
//spit out color
return clr;
}